package cn.wx.scholar.core.service;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import cn.wx.scholar.core.entity.TxtBook;
import cn.wx.common.persistence.base.BaseService;
import cn.wx.scholar.core.mapper.TxtBookMapper;


/**
 * <p>
 *  服务类
 * </p>
 *
 * @author  
 * @since 2018-08-02
 */
@Service
@Transactional
public class TxtBookService extends BaseService<TxtBook, TxtBookMapper> {
	
	public void deleteByTxtFile(Integer fileName) {
		
		/**
		 * 先清空读取失败的内容
		 */
		
		simpleMapper.deleteByTxtFile(fileName);
	}
	
	/**
	 * 把数据库的中记录更新成-1
	 */
	public void updateFileName() {
		simpleMapper.updateFileName();
	}
	
	
	public String queryOnefileName(Integer fx) {
		return simpleMapper.queryOnefileName(fx);
	}
}
